/*
 * @Author: funlee
 * @Email: i@funlee.cn
 * @Date: 2019-06-26 15:11:52
 * @Description: 首页-控制台-管控预警
 */
import { observable, action } from "mobx";
import resource from "@/utils/resource";
import API from "@/utils/api";
import axios from "axios";

class ConsoleWarningStore {
    @observable topData = [];
    @observable listData = [];

    @action.bound
    getData() {
        axios.all([resource.get(API.homeConsoleWarningTop), resource.get(API.homeConsoleWarningLists)]).then(
            axios.spread((topData, listData) => {
                this.topData = topData;
                this.listData = listData;
            })
        );
    }
}

export default new ConsoleWarningStore();
